package com.softserveinc.interactive_board.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.URL;

@Entity
@Table(name = Slide.TABLE_NAME)
public class Slide {
	public static final int COLUMNS_MAX_LENGTH = 20;
	public static final int DESCRIPTION_COLUMN_MAX_LENGTH = 500;

	public static final String TABLE_NAME = "picture";
	public static final String ID_COLUMN_NAME = "picture_id";
	public static final String TITLE_COLUMN_NAME = "title";
	public static final String CODE_COLUMN_NAME = "code";
	public static final String SOURCE_COLUMN_NAME = "source";
	public static final String DESCRIPTION_COLUMN_NAME = "description";
	public static final String PRESENTATION_ID_COLUMN_NAME = "presentation_id";
	public static final String DATE_CONDUTION_COLUMN_NAME = "date_conduction";

	@Id
	@Column(name = Slide.ID_COLUMN_NAME)
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	@Column(name = Slide.TITLE_COLUMN_NAME, length = Slide.COLUMNS_MAX_LENGTH)
	private String title;

	@URL
	@Column(name = Slide.SOURCE_COLUMN_NAME)
	private String path;

	@NotEmpty
	@Column(name = Slide.CODE_COLUMN_NAME)
	private String code;

	@NotEmpty
	@Column(name = Slide.PRESENTATION_ID_COLUMN_NAME)
	private int presentationId;

	@Column(name = Slide.DESCRIPTION_COLUMN_NAME, length = Slide.COLUMNS_MAX_LENGTH)
	private String description;

	@Temporal(TemporalType.DATE)
	@Column(name = Slide.DATE_CONDUTION_COLUMN_NAME)
	private Date date;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public int getPresentationId() {
		return presentationId;
	}

	public void setPresentationId(int presentationId) {
		this.presentationId = presentationId;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public static int getColumnsMaxLength() {
		return COLUMNS_MAX_LENGTH;
	}

	public static int getDescriptionColumnMaxLength() {
		return DESCRIPTION_COLUMN_MAX_LENGTH;
	}

	public static String getTableName() {
		return TABLE_NAME;
	}

	public static String getIdColumnName() {
		return ID_COLUMN_NAME;
	}

	public static String getTitleColumnName() {
		return TITLE_COLUMN_NAME;
	}

	public static String getCodeColumnName() {
		return CODE_COLUMN_NAME;
	}

	public static String getSourceColumnName() {
		return SOURCE_COLUMN_NAME;
	}

	public static String getDescriptionColumnName() {
		return DESCRIPTION_COLUMN_NAME;
	}

	public static String getPresentationIdColumnName() {
		return PRESENTATION_ID_COLUMN_NAME;
	}

	public static String getDateCondutionColumnName() {
		return DATE_CONDUTION_COLUMN_NAME;
	}
		
	
	
}
